﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="DocumentRename.aspx.vb"
    Inherits="MyWorkflow.DocumentRename" EnableEventValidation="false"  %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head runat="server">
    <title>文档更名</title>
    <link href="/_common/styles/global.css" type="text/css" rel="stylesheet">
    <link href="/_forms/styles/Form.css" rel="stylesheet" type="text/css" />
    <script language="javascript" src="Workflow.js"></script>
    <script language="javascript" src="/_controls/util/util.js"></script>
    <script type="text/javascript">
    function check()
    {
        if(document.getElementById("tbName").value == "")
        {
            alert("文档名称不能为空！");
            return false;
        }
            
        var reutrnValue = GetDataFromXMLHTTP("/MyWorkflow/WF_XmlHTTP.aspx","DocumentRename",document.getElementById("__oid").value,document.getElementById("tbName").value,"");
        if(reutrnValue == "1"){
                window.returnValue = document.getElementById("tbName").value;
                window.close();
           }
           else
           {
                alert("文档更名失败！");
                window.returnValue ="";
                window.close();
           }
    }
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <table width="100%" height="100%">
        <tr>
            <td width="20%" height="15px">
            </td>
            <td>
            </td>
        </tr>
        <tr>
            <td class="req" align="right">
                文档名称
            </td>
            <td align="left">&nbsp;
                <asp:TextBox ID="tbName" forbiddenChars='/\:*?"<>|' maxLength="80" runat="server" Width="260px" style="font-size:9pt;border:1px solid #7b9ebd;"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td colspan="2" valign="bottom" height="30px">
            </td>
        </tr>
        <tr>
            <td colspan="2" valign="bottom" height="1px" style="background-color:#E4E4E4">
            </td>
        </tr>
        <tr height="40">
            <td colspan="2" class="buttons" align="right">
                <button id="btnOK" onclick="check();" name="btnOk" type="button" value="确 定">
                    确 定</button>&nbsp;&nbsp;
                <button id="btnClose" onclick="window.close();" name="btnClose"
                    type="button" value="取 消">
                    取 消</button>
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
